import requests

#定义测试接口
url = 'http://127.0.0.1:8000/register/'

#定义参数
data = {'username':'test1','password':'123'}

#发起请求
res = requests.get(url,params=data)
res1 = requests.post(url,data=data)

print(res.text)
print(res1.text)

